package cn.kgc.crowdfundingadminspringboot.pojo;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

public class SecurityAdmin extends User {
    private static final long serialVersionUID = 1L;

    private T_admin originalAdmin;

    public SecurityAdmin(T_admin originalAdmin, Collection<? extends GrantedAuthority> authorities) {
        super(originalAdmin.getLoginacct(), originalAdmin.getUserpswd(), authorities);
        this.originalAdmin = originalAdmin;
    }

    public T_admin getOriginalAdmin() {
        return originalAdmin;
    }
}
